package com.controller;

import com.entity.Checkinfo;
import com.service.CheckinfoService;
import com.until.Result;
import com.vo.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author :hcy
 * @date:
 * @description:
 */
@RestController
@RequestMapping("check")
public class CheckinfoController extends BaseController {
    @Resource
    private CheckinfoService checkinfoService;
    @PostMapping("listAllCheckinfo")
    public Result listAllCheckinfo(@RequestBody Page<Checkinfo> page){
        return success(checkinfoService.listAllCheckinfo(page));
    }
    @GetMapping("getById")
    public Result getById(Integer checkId){
        return success(checkinfoService.getById(checkId));
    }
    @PostMapping("addinfoCheckinfo")
    public Result addinfoCheckinfo(@RequestBody Checkinfo checkinfo){
        return success(checkinfoService.addinfoCheckinfo(checkinfo));
    }
    @DeleteMapping("deleteCheckinfo")
    public Result deleteCheckinfo(Integer checkId){
        return success(checkinfoService.deleteCheckinfo(checkId));
    }
    @GetMapping("listStores")
    public Result listStores(){
        return success(checkinfoService.listStores());
    }

    @PostMapping("updateState")
    public Result updateState(@RequestBody Checkinfo haha){
        return success(checkinfoService.updateState(haha));
    }
}
